
/*设置倒计时为12小时，单位秒*/
var total = 12*60*60
var timer_bg = document.querySelectorAll('.timer-bg')
var timer = setInterval(function(){
	total--;
	let hour = Math.floor(total/(60*60))
	let minute = Math.floor((total - hour*60*60)/60)
	let second = total%60		
	timer_bg[0].innerHTML = Math.floor(hour/10)
	timer_bg[1].innerHTML = hour%10
	timer_bg[2].innerHTML = Math.floor(minute/10)
	timer_bg[3].innerHTML = minute%10
	timer_bg[4].innerHTML = Math.floor(second/10)
	timer_bg[5].innerHTML = second%10
	if(total<=0){
		clearInterval(timer)
	}
},1000)
